import { createRequest } from '/@/api/service';
const module = 'ib/archive/police/v1/DossierStatistics/';

/**
 * @function 统计分析——审批统计
 * @param data
 * @param header
 * @returns
 */
function QUERY_DOSSIER_STATISTICS_BY_DATE(
  data: DossierStatistics.DossierStatisticsBaseReq,
  header: object = {},
): Promise<DossierStatistics.DossierStatisticsBaseResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryDossierStatisticsByDate`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 统计分析——部门借阅统计
 * @param data
 * @param header
 * @returns
 */
function QUERY_DOSSIER_STATISTICS_BY_DEPT(
  data: DossierStatistics.DossierStatisticsBaseReq,
  header: object = {},
): Promise<DossierStatistics.DossierStatisticsBaseResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryDossierStatisticsByDept`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 统计分析——档案借阅排名
 * @param data
 * @param header
 * @returns
 */
function QUERY_DOSSIER_STATISTICS_BY_DOSSIER(
  data: DossierStatistics.DossierStatisticsBaseReq,
  header: object = {},
): Promise<DossierStatistics.DossierStatisticsBaseResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryDossierStatisticsByDossier`,
    data,
    header,
    'POST',
  );
}

export {
  QUERY_DOSSIER_STATISTICS_BY_DATE,
  QUERY_DOSSIER_STATISTICS_BY_DEPT,
  QUERY_DOSSIER_STATISTICS_BY_DOSSIER,
};
